#ifndef GAMEWINDOWLABEL_H
#define GAMEWINDOWLABEL_H

#include <QObject>
#include <QLabel>
#include <QWidget>
#include <QPainter>
#include <QDebug>
#include <QKeyEvent>
#include <QTimer>
#include <QList>
#include <QTime>
#include<cmath>

#include "enemyword.h"

class GameWindowLabel : public QLabel
{
    Q_OBJECT

    int level; // 1 - 10
    int score; // 按键次数

    QPoint firePoint;
    QPoint targetPoint;

    int gameDeadLine;

    QTimer *timerCannon;
    int cannonLen;

    QTimer *timerRunning;

    QList<EnemyWord *> wordList;
    EnemyWord *lockedWord;

public:
    GameWindowLabel(QWidget *parent = 0);
    void getKey(const QString &c);

    void generateWords(int cnt);

protected:
    void paintEvent(QPaintEvent *e) override;
    void mouseMoveEvent(QMouseEvent *ev) override;



};

#endif // GAMEWINDOWLABEL_H
